package com.jade.store.wechat.biz.protocol.msg;

/**
 * Created with IntelliJ IDEA.
 * User: jinya
 * Date: 2017/1/3
 * Time: 19:58
 * TEL :17701640710   MAIL:2009_jinya@163.com
 * To change this template use File | Settings | File Templates.
 */
public class ReplyText {
    private String ToUserName;
    private String FromUserName;
    private long CreateTime;
    private String MsgType;
    private String Content;

    public String getToUserName() {
        return ToUserName;
    }

    public void setToUserName(String toUserName) {
        ToUserName = toUserName;
    }

    public String getFromUserName() {
        return FromUserName;
    }

    public void setFromUserName(String fromUserName) {
        FromUserName = fromUserName;
    }

    public long getCreateTime() {
        return CreateTime;
    }

    public void setCreateTime(long createTime) {
        CreateTime = createTime;
    }

    public String getMsgType() {
        return MsgType;
    }

    public void setMsgType(String msgType) {
        MsgType = msgType;
    }

    public String getContent() {
        return Content;
    }

    public void setContent(String content) {
        Content = content;
    }

    public String toXML()
    {
        StringBuilder sb = new StringBuilder();
        sb.append("<xml>");
        sb.append("<ToUserName><![CDATA[" + ToUserName + "]]></ToUserName>");
        sb.append("<FromUserName><![CDATA[" + FromUserName + "]]></FromUserName>");
        sb.append("<CreateTime>" + System.currentTimeMillis() / 1000 + "</CreateTime>");
        sb.append("<MsgType><![CDATA[" + MsgType + "]]></MsgType>");
        sb.append("<Content><![CDATA[" + Content + "]]></Content>");
        sb.append("</xml>");
        return sb.toString();
    }
}
